<%@page import="org.springframework.context.annotation.Import"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript"
	src='<c:url value="/resources/js/configuration/operatorList.js"/>'></script>

<c:if test="${empty pagingBean.data }">
	<p class="msg info">
		没有符合条件的记录
	</p>
</c:if>

<c:if test="${!empty pagingBean.data }">
	<table>
		<tbody>
			<tr>
				<th>
					编号
				</th>
				<th>
					姓名
				</th>
				<th>
					用户名
				</th>
				<th>
					操作
				</th>
			</tr>

			<c:forEach items="${pagingBean.data }" var="operator"
				varStatus="status">
				<c:if test="${status.count%2==0}">
					<tr class="odd">
				</c:if>
				<c:if test="${status.count%2!=0}">
					<tr>
				</c:if>
				<td>
					${operator.id }
				</td>
				<td>
					${operator.name }
				</td>
				<td>
					${operator.userName }
				</td>
				<td>
					<a href="#" class="edit" onclick="edit(${operator.id })">编辑</a>
					<a href="#" class="delete"
						onclick="deleteOperator(${operator.id })">删除</a>
				</td>
				</tr>
			</c:forEach>

			<tr>
				<th colspan="4" class="t-right">
					<c:if test="${pagingBean.hasPreviousPage }">
						<input id="previousButton" type="button" value="上一页">
						<input id="previousPageIndex" type="hidden"
							value="${pagingBean.previousPage}">
					</c:if>
					<c:if test="${!pagingBean.hasPreviousPage }">
						<input id="previousButton" type="button" disabled="disabled"
							value="上一页">
					</c:if>
					<input id="currentPageIndex" type="hidden"
						value="${pagingBean.afterDeletePage}">
					<select name="pageIndex" id="pageSelection">
						<c:if test="${empty pagingBean.data }">
							<option selected="selected" value="1">
								第1页
							</option>
						</c:if>
						<c:if test="${!empty pagingBean.data }">
							<c:forEach items="${pagingBean.pageIndexList }" var="index">
								<c:if test="${index==pagingBean.currentPage }">
									<option selected="selected" value="${index }">
										第${index }页
									</option>
								</c:if>
								<c:if test="${index!=pagingBean.currentPage }">
									<option value="${index }">
										第${index }页
									</option>
								</c:if>
							</c:forEach>
						</c:if>
					</select>
					<c:if test="${pagingBean.hasNextPage }">
						<input id="nextButton" type="button" value="下一页">
						<input id="nextPageIndex" type="hidden"
							value="${pagingBean.nextPage}">
					</c:if>
					<c:if test="${!pagingBean.hasNextPage }">
						<input id="nextButton" type="button" disabled="disabled"
							value="下一页">
					</c:if>
				</th>
			</tr>
	</table>
</c:if>
<div id="progressbar" style="">
	<p>
		操作正在进行...
	</p>
</div>